// 查询列表
import request from "@/utils/request";

/**
 * 列表
 * @param data
 * @returns {AxiosPromise}
 */
export function listDoc(data) {
    return request({
        url: '/wbzj-biz/docag/doc/getDocPageList',
        method: 'post',
        data: data
    })
}

/**
 * 详情
 * @param prdId
 * @returns {AxiosPromise}
 */
export function getDocById(query) {
    return request({
        url: '/wbzj-biz/docag/doc/getDoc',
        method: 'get',
        params: query
    })
}

// 保存
export function updateDoc(data) {
    return request({
        url: '/wbzj-biz/docag/doc/updateDoc',
        method: 'post',
        data: data
    })
}

/**
 * 列表
 * @param data
 * @returns {AxiosPromise}
 */
export function listTag(data) {
    return request({
        url: '/wbzj-biz/docag/doc/getDocTagList',
        method: 'post',
        data: data
    })
}

export function getTagById(pkId) {
    return request({
        url: '/wbzj-biz/docag/doc/getDocTag/'+ pkId,
        method: 'get'
    })
}

export function getDocTagDetails(query) {
    return request({
        url: '/wbzj-biz/docag/doc/getDocTagDetails',
        method: 'get',
        params:query
    })
}

// 保存
export function updateTag(data) {
    return request({
        url: '/wbzj-biz/docag/doc/updateDocTag',
        method: 'post',
        data: data
    })
}

// 删除菜单
export function delTag(pkId) {
    return request({
        url: '/wbzj-biz/docag/doc/deleteDocTag/' + pkId,
        method: 'delete'
    })
}